package com.dmp.onlinestore.model.dao.jdbc.base;

import java.sql.SQLException;

public class JdbcDao {

	private JdbcDaoTransaction transaction;
	
	public JdbcDao (JdbcDaoTransaction transaction) {
		setTransaction(transaction);
	}
	
	protected JdbcDaoTransaction getTransaction() {
		return this.transaction;
	}
	
	protected void setTransaction(JdbcDaoTransaction transaction) {
		this.transaction = transaction;
	}
	
	protected void logSQLException(SQLException e) {
	    System.out.println("SQLException: " + e.getMessage());
	    System.out.println("SQLState: " + e.getSQLState());
	    System.out.println("VendorError: " + e.getErrorCode());
	}
}
